package com.moyun.common.mapstruct;

import com.moyun.model.param.system.ImportUserParam;
import com.moyun.model.param.system.SysUserEntityParam;
import com.moyun.model.po.system.SysUserEntity;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;

@Mapper(componentModel = "spring")
public interface SysUserConvertMapper {
    /**
     * 相同属性名会自动映射
     * 不同属性之间的映射需要使用 @Mapping(target = "xxx", source = "xxx") 注解来关联
     */
    @Mapping(target = "userPassword", source = "password")
    SysUserEntity importUserParamtoSysUserEntity(ImportUserParam importUserParam);

    SysUserEntity sysUserEntityParamtoSysUserEntity(SysUserEntityParam sysUserEntityParam);
}
